#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N=1e5+10;
int n,a[N];
signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
    }
    sort(a+1,a+1+n);
    int res=0,tmp=0;
    for(int i=1;i<=n;i++){
        if(a[i]!=a[i-1])res+=tmp,tmp=0;
        tmp++;
        if(res)res--;
    }
    res+=tmp;
    cout<<res;
    return 0;
}
